package PTA2.ti32;

import java.util.Scanner;

/**
 * @author Lenovo
 */

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        String opStr = scanner.next();
        char op = opStr.charAt(0);
        int b = scanner.nextInt();

        switch (op) {
            case '&':
                System.out.printf("%d %c %d = %d", a, op, b, a & b);
                break;
            case '|':
                System.out.printf("%d %c %d = %d", a, op, b, a | b);
                break;
            case '^':
                System.out.printf("%d %c %d = %d", a, op, b, a ^ b);
                break;
            default:
                System.out.println("ERROR");
                break;
        }
    }
}
